import java.io.*;

public class FileAppend {
    public static void main(String[] args)  throws FileNotFoundException {
         FileOutputStream outstream = new FileOutputStream("Example.txt", true);
         PrintWriter pwriter = new PrintWriter(outstream);
         pwriter.println("Jubail");
         pwriter.println("Hafr Al-Batin");
         pwriter.println(22.85);
         pwriter.println('B');
         pwriter.print(false);  
         pwriter.close();
        // For convenience, let the user know contents appended to file
        System.out.println("Contents appended to file.");   
    }
}